package com.jackstraw.jack_base.datasource.database.generator.service;

import com.jackstraw.jack_base.datasource.database.generator.entity.GeneratorVo;
import com.jackstraw.jack_base.datasource.database.generator.entity.TableEntity;
import com.jackstraw.jack_base.util.entity.enums.DataBaseEnum;

import java.util.List;

public interface GeneratorService {



    /**
     * 批量查询表数据
     *
     * @param tableNameList
     * @return
     */
    List<TableEntity> queryList(List<String> tableNameList, DataBaseEnum dataBaseEnum);

    /**
     * 查询表数据
     *
     * @param tableName
     * @return
     */
    TableEntity queryTable(String tableName, DataBaseEnum dataBaseEnum);


    /**
     * 拼接列信息
     *
     * @param tableEntity
     */
    void queryColumns(TableEntity tableEntity, DataBaseEnum dataBaseEnum);


    /**
     * 查询主键信息
     *
     * @param tableEntity
     */
    List<String> queryPkColumns(TableEntity tableEntity, DataBaseEnum dataBaseEnum);


    /**
     * 生成文件的方法
     *
     * @param generatorVo
     * @return
     */
    byte[] generatorCode(GeneratorVo generatorVo);


}
